<template>
  <div class="box">
    <div class="nav">
      <p
        v-for="(item, index) in navlist"
        @click="liang(index)"
        :class="{ static: statice == index }"
        :key="index"
      >
        {{ item.name }}
      </p>
      </div>
      <div class="list">
        <div class="item">
            <div class="tou">
                <p>纯手工饺子(凤城九路店)</p>
                <p>已送达</p>
            </div>
            <div class="main">
                <div class="zuo">
                    <div class="tu"></div>
                    <div class="tu"></div>
                </div>
                <div class="you">
                    <p>￥17.8</p>
                    <p>共2件</p>
                </div>
            </div>
            <button>再来一单</button>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    liang(index) {
      this.statice = index;
    },
  },
  data() {
    return {
      statice: 0,
      navlist: [
        { name: "全部" },
        { name: "待消费" },
        { name: "待评价" },
        { name: "退款" },
      ],
    };
  },
};
</script>

<style scoped>
.box {
  padding: 10px;

}
.nav {
  display: flex;
  margin-bottom: 10px;
}
.nav p {
  margin-right: 15px;
  margin-left: 5px;
}
.nav .static {
  font-weight: 800;
}
.item{
    padding: 10px;
    width: 100%;
    height: 155px;
    background-color: white;
    border-radius: 5px;
}
.item .tou{
    display: flex;
    justify-content: space-between;
}
.item .tou p:nth-child(1){
    font-weight: 800;
    font-size: 15px;
}
.item .tou p:nth-child(2){
    color: gray;
    font-size: 14px;
}
.item .main{
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}
.item .main .zuo{
    display: flex;
}
.item .main .tu{
    width: 60px;
    height: 60px;
    background-color: pink;
    border-radius: 5px;
    margin-right: 5px;
}
.item .main .you{
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}
.item .main .you p:nth-child(1){
    font-weight: 800;
    font-size: 14px;
}
.item .main .you p:nth-child(2){
    color: gray;
    font-size: 13px;
    text-align: center;
}
.item button{
    width: 80px;
    height: 30px;
    border-radius: 15px;
    border: 2px solid blueviolet;
    background-color: white;
    color: blueviolet;
    margin-top: 10px;
    float: right;
    font-size: 13px;
}

</style>